<?php include "admin_sess.php"; ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Education 1</title>
<!--// Stylesheet //-->
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="css/ddsmoothmenu.css" rel="stylesheet" type="text/css" />
<link href="css/jquery.fancybox-1.3.1.css" rel="stylesheet" type="text/css" />
<!--// Javascript //-->
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/ddsmoothmenu.js"></script>
<script type="text/javascript" src="js/menu.js"></script>
<script type="text/javascript" src="js/contentslider.js"></script>
<script type="text/javascript" src="js/cufon-yui.js"></script>
<script type="text/javascript" src="js/Tahoma_5F400-Tahoma_700.font.js"></script>
<script type="text/javascript">Cufon.replace('h1, h2, h3, h4, h5, h6, .cufontxt');</script>
<script type="text/javascript" src="js/jquery.fancybox-1.3.1.js"></script>
<script type="text/javascript" src="js/lightbox.js"></script>
<script type="text/javascript" src="js/animatedcollapse.js"></script>
<script type="text/javascript" src="js/collapse.js"></script>
<!--[if lte IE 7]><style>.gallery .buttons{padding-left:300px; width:640px;}.gallery .buttons a{float:left;}</style><![endif]--><!-- that's IT-->
<style type="text/css">
#develop {
	color: #FFF;
	font-size: 14px;
}
</style>
</head>
<body class="subpage">
<!-- Wrapper -->
<div id="wrapper_sec">
	<!-- Header -->
    <div id="masthead" class="smallhead">
        <!-- Top Section -->
        <div class="topsec">
            <div class="inner">
                
          
            </div>
        </div>
        <div class="clear"></div>
        <!-- Small Banner -->
        <div class="smallbanner">
            <div class="inner">
                <div class="logo">
                	<a href="index.html"><img src="images/logo.png" alt="" /></a>
                </div>
            </div>
        </div>
        <div class="clear"></div>
        <!-- Navigation -->
        <div class="navigation">
        	<div class="inner">
        		<div id="smoothmenu1" class="ddsmoothmenu">
                    <ul>
                        <li><a href="home admin.php">Home</a></li>
                        <li class="down"><a href="student.php">Student</a>
                        <ul>
                                <li><a href="student info.php">Student Diploma</a></li>
                                <li><a href="student info short.php">Short Cource</a></li>
                                <li><a href="student academic.php">Add Student Academic Info</a></li>
                                <li><a href="student subject.php">Student Enrolled Subject</a></li>
                                <li><a href="student edit.php">Update</a></li>
                                
                            </ul>  </li>
                        <li class="down"><a href="teacher.php">Teacher</a>
                            <ul>
                                <li><a href="add teacher.php">Add Teacher</a></li>
                                <li><a href="teacher edit.php">update</a></li>
                                <li><a href="update teacher.php">Add Teacher</a></li>
                             
         						</ul>
                        </li>
                        <li class="down"><a href="campus.php">Campus</a>
                            <ul>
                                <li><a href="add campus.php">Add Campus</a></li>
                                <li><a href="add department.php">Add Department</a></li>
                                <li><a href="add class.php">Add Class</a></li>
                                <li><a href="add subject.php">Add Subject</a></li>
                                <li><a href="add short cources.php">Add Short Cources</a></li>
                                <li><a href="add year.php">Add Year</a></li>
                                <li><a href="add academic session.php">Add Academic Session</a></li>
                                <li><a href="edit campus.php">Update</a></li>
                                
                            </ul>
                        </li>
                        <li><a href="student test.php">Student Test</a>
                        <ul>
                                <li><a href="1monthly test.php">Monthly Test</a></li>
                                <li><a href="1send up.php">Send Up</a></li>
                                <li><a href="1board.php">Board</a></li>
                                <li><a href="student test edit.php">Update</a></li>
                                
                                
                            </ul>
                        
                     </li>
                        <li class="down"><a href="check profile.php">User accounts</a>
                            <ul>
                                <li><a href="create student account.php">Create Student Account </a></li>
                                <li><a href="create teacher account.php">Create Teacher Account</a></li>
                                <li><a href="check profile admin.php">Profile</a></li>
                                <li><a href="change password admin.php">Change Password</a></li>
                                
                                <li><a href="check profile edit.php">Update</a></li>
                            </ul>
                        </li>
                        <li class="down"><a href="attendence.php" class="last">Attendence</a>
                            <ul>
                                <li><a href="student attendence.php">Student Attendence</a></li>
                                <li><a href="teacher attendence.php">Teacher Attendence</a></li>
                                <li><a href="attendence edit.php">Update</a></li>
                                
                            </ul>
                        </li>
                    </ul>
                    <div class="clear"></div>
                </div>
                <ul class="loginsec">
                	
                    <li><a href="logout.php"  class="buttonone">Logout</a></li>
                </ul>
            </div>
        </div>
    </div>
    <div class="clear"></div>
    <!-- Content Section -->
    <div id="content_sec">
    	<div class="inner">
        	<!-- Bread Crumb -->
        	<div class="clear">
              <table width="100%" border="1">
                <tr>
                  <td><table width="100%" border="1">
                    <tr>
                      <td align="center"><p><strong>Update Send Up Info</strong></p>
                        <table width="70%" border="0">
                        <tr align="center">
                          <td><strong>Date</strong></td>
                          <td><strong>Send Up ID</strong></td>
                          <td><strong>Class ID</strong></td>
                          <td><strong>Subject ID</strong></td>
                          <td><strong>Total Marks</strong></td>
                          <td><strong>Teacher ID</strong></td>
                          <td><strong>Roll No</strong></td>
                          <td> <strong>Obtain Marks</strong></td>
                          <td><strong>Update</strong></td>
                        </tr>
                        <?php 
  include "connect.php";
  
$page_name="update send up.php"; //  If you use this code with a different page ( or file ) name then change this 

$start=$_GET['start'];								// To take care global variable if OFF
if(!($start > 0)) {                         // This variable is set to zero for the first page
$start = +0;
}

$eu = ($start -0);                
$limit = 1;                                 // No of records to be shown per page.
$this1 = $eu + $limit; 
$back = $eu - $limit; 
$next = $eu + $limit; 


/////////////// WE have to find out the number of records in our table. We will use this to break the pages///////
$query2=" SELECT * FROM send_up  ";
$result2=mysql_query($query2);
echo mysql_error();
$nume=mysql_num_rows($result2);
/////// The variable nume above will store the total number of records in the table////

/////////// Now let us print the table headers ////////////////


////////////// Now let us start executing the query with variables $eu and $limit  set at the top of the page///////////
$query=" SELECT * FROM send_up   ";
$result=mysql_query($query);
echo mysql_error();

//////////////// Now we will display the returned records in side the rows of the table/////////
while($noticia = mysql_fetch_array($result))
{
$send_up_id=$noticia['send_up_id'];
$query3=" SELECT * FROM send_up_detail where send_up_id='$send_up_id' limit $eu, $limit  ";
$result3=mysql_query($query3);
echo mysql_error();

//////////////// Now we will display the returned records in side the rows of the table/////////
while($noticia2 = mysql_fetch_array($result3))
{
	
	
if($bgcolor=='#f1f1f1'){$bgcolor='#ffffff';}
else{$bgcolor='#f1f1f1';}
  
echo "  <tr> " ;
echo "<td align=left bgcolor=$bgcolor id='title'>&nbsp;<font face='Verdana' size='2'>$noticia[date]</font></td>";
echo "<td align=left bgcolor=$bgcolor id='title'>&nbsp;<font face='Verdana' size='2'>$noticia2[send_up_id]</font></td>"; 
echo "<td align=left bgcolor=$bgcolor id='title'>&nbsp;<font face='Verdana' size='2'>$noticia[class_id]</font></td>";
echo "<td align=left bgcolor=$bgcolor id='title'>&nbsp;<font face='Verdana' size='2'>$noticia[subject_id]</font></td>";
echo "<td align=left bgcolor=$bgcolor id='title'>&nbsp;<font face='Verdana' size='2'>$noticia[total_marks]</font></td>";
echo "<td align=left bgcolor=$bgcolor id='title'>&nbsp;<font face='Verdana' size='2'>$noticia[teacher_id]</font></td>";
echo "<td align=left bgcolor=$bgcolor id='title'>&nbsp;<font face='Verdana' size='2'>$noticia2[roll_no]</font></td>";
echo "<td align=left bgcolor=$bgcolor id='title'>&nbsp;<font face='Verdana' size='2'>$noticia2[obtain_marks]</font></td>";

  ?>
                      
                          <td align="center"><p><a href="update send up1.php?up=<?php echo $noticia['send_up_id']; ?>&roll=<?php echo $noticia2['roll_no']; ?>"><strong>Update</strong></a></p></td>
                          <?php }}
						  $p_limit=8; // This should be more than $limit and set to a value for whick links to be breaked

$p_f=$_GET['p_f'];								// To take care global variable if OFF
if(!($p_f > 0)) {                         // This variable is set to zero for the first page
$p_f = 0;
}



$p_fwd=$p_f+$p_limit;
$p_back=$p_f-$p_limit;
//////////// End of variables for advance paging ///////////////
/////////////// Start the buttom links with Prev and next link with page numbers /////////////////
echo "<table align = 'center' width='50%'><tr><td  align='left' width='20%'>";
if($p_f<>0){print "<a href='$page_name?start=$p_back&p_f=$p_back'><font face='Verdana' size='2'>PREV $p_limit</font></a>"; }
echo "</td><td  align='left' width='10%'>";
//// if our variable $back is equal to 0 or more then only we will display the link to move back ////////
if($back >=0 and ($back >=$p_f)) { 
print "<a href='$page_name?start=$back&p_f=$p_f'><font face='Verdana' size='2'>PREV</font></a>"; 
} 
//////////////// Let us display the page links at  center. We will not display the current page as a link ///////////
echo "</td><td align=center width='30%'>";
for($i=$p_f;$i < $nume and $i<($p_f+$p_limit);$i=$i+$limit){
if($i <> $eu){
$i2=$i+$p_f;
echo " <a href='$page_name?start=$i&p_f=$p_f'><font face='Verdana' size='2'>$i</font></a> ";
}
else { echo "<font face='Verdana' size='4' color=red>$i</font>";}        /// Current page is not displayed as link and given font color red

}


echo "</td><td  align='right' width='10%'>";
///////////// If we are not in the last page then Next link will be displayed. Here we check that /////
if($this1 < $nume and $this1 <($p_f+$p_limit)) { 
print "<a href='$page_name?start=$next&p_f=$p_f'><font face='Verdana' size='2'>NEXT</font></a>";} 
echo "</td><td  align='right' width='20%'>";
if($p_fwd < $nume){
print "<a href='$page_name?start=$p_fwd&p_f=$p_fwd'><font face='Verdana' size='2'>NEXT $p_limit</font></a>"; 
}
echo "</td></tr></table>";

						  
						  
						  
						  
						  
						  
						  
						  
						  ?>
                        </tr>
                      </table></td>
                    </tr>
                  </table></td>
                </tr>
              </table>
            </div>
        	<!-- Column 3 -->
   	    <div class="clear"></div>
            <!-- Affiliations -->
            <div class="clear"></div>
        </div>
    </div>
    <div class="clear"></div>
    <!-- Footer -->
    <div id="footer">
    <div class="clear"></div>
        <div class="copy_inner">
        	<p><table width="100%" border="0">
  <tr>
    <td align="center" bgcolor="#5085C7" id="develop">Developed by Compact Sols</td>
  </tr>
</table>
</p>
            
           
            <a href="#" class="top">Top</a>
        </div>
    </div>
</div>
</body>
</html>
